<template>
  <el-form :inline="true" :model="formInline" class="demo-form-inline">
    <el-form-item label="订单号">
      <el-input v-model="formInline.name" placeholder="订单号"></el-input>
    </el-form-item>

    <el-form-item label="收货人">
      <el-input v-model="formInline.region" placeholder="收货人"></el-input>
    </el-form-item>

    <el-form-item>
      <el-button type="primary" @click="onSubmit">查询</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
//引入api
import { getAdminOrder } from "@/request/api.js";

export default {
  data() {
    return {
      formInline: {}
    };
  },
  // 方法
  methods: {
    onSubmit() {
      getAdminOrder({
        consignee: this.formInline.region,
        orderSn: this.formInline.name,
        page: this.$store.state.order.currentPage,
        size: this.$store.state.order.pageSize
      }).then(res => {
        console.log("获取order", res.data);
        this.$store.commit("orderattributeList", res.data);
        // console.log(state.tableData)
      });
    }
  }
};
</script>

<style lang='less' scoped>
.el-form {
  background-color: #fff;
  height: 42px;
}
</style>